package com.ipartek.pruebas.capitulo12;
/**
 * 
 * @author practicas1
 *
 */
public class PuntoP1 {
	int x, y;
	
	/**
	 * 
	 */
	public PuntoP1(){
		this.x = 0;
		this.y = 0;
	}
	/**
	 * 
	 * @param x
	 * @param y
	 */
	public PuntoP1(int x, int y) {
		super();
		this.x = x;
		this.y = y;
	}
	/**
	 * 
	 * @return
	 */
	public int getX() {
		return x;
	}
	/**
	 * 
	 * @param x
	 */
	public void setX(int x) {
		this.x = x;
	}
	/**
	 * 
	 * @return
	 */
	public int getY() {
		return y;
	}
	/**
	 * 
	 * @param y
	 */
	public void setY(int y) {
		this.y = y;
	}
	@Override
	public String toString() {
		return "x=" + this.x + ", y=" + this.y;
	}
	
	public int sumar(){
		return this.x + this.y;
	}
	
	

}
